package net.zdreamer.geracomium.ui.more;

import android.content.Intent;
import android.os.Bundle;
import android.widget.Gallery;

import com.example.geracomium.R;

import net.zdreamer.geracomium.adapter.ImageAdapter;
import net.zdreamer.geracomium.entity.PhotoInfos;
import net.zdreamer.geracomium.ui.BaseActivity;

public class PhotoGerallyActivity extends BaseActivity {
    private Gallery myGallery;
    private ImageAdapter imgadapter;
    private PhotoInfos photoinfos;
    private int item;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

    }

    @Override
    protected int getContentView() {
        return R.layout.activity_photo_gerally;
    }

    @Override
    protected void init() {
        myGallery = (Gallery) findViewById(R.id.mygallery);

    }

    @Override
    protected void initViews() {
        initTitle("照片查询", R.drawable.selector_title_back, 0, true, false);
        Intent intent = getIntent();
        item = intent.getExtras().getInt("position");
        photoinfos = new PhotoInfos();
        imgadapter = new ImageAdapter(PhotoGerallyActivity.this, photoinfos.photoinfos, R.layout.grid_photoinfo, item);
        myGallery.setAdapter(imgadapter);
    }

    @Override
    protected void initListener() {
    }


}
